<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <style>
        .head {
            width: 100%;
            height: 90px;
            text-align: center;
        }

        .head span {
            width: 100%;
            font-size: 30px;
            font-weight: 700;
            color: #333333;
            line-height: 60px;
            letter-spacing: 40px;

        }

        .headTable td {
            font-weight: bold;
        }

        .trMxTitle {
            font-size: 12px;
        }

        body {
            font-family: SimSun;
            font-size: 10px;
        }

        tr {
            /*height: 20px;*/
        }

        td {
            /*word-wrap: break-word;*/
            /*word-break: break-all;*/
        }

        .left {
            text-align: left;
        }

        .right {
            text-align: right;
        }

        .center {
            text-align: center;
        }

        .demo3 {
            border: 1px solid #1c1a1a;
            border-collapse: collapse;
        }

        .demo3 th, .demo3 td {
            border: 0.5px solid #1c1a1a;
            padding: 3px; /* 在单元格内部添加间距 */
        }
        .demo4 {
            border: 0px solid #1c1a1a;
            border-collapse: collapse;
        }

        .demo4 th, .demo4 td {
            border: 0px solid #1c1a1a;
            padding: 3px; /* 在单元格内部添加间距 */
        }
    </style>
</head>

<body>
<#escape x as x?html>
<#assign size=12>
<#if field_1?exists>

<#--计算所有明细合计-----begin----->
<#assign lineTotal=0>
<#list 0 .. field_1?size - 1 as i>
    <#assign data=field_1[i]>
    <#if data.Qty?exists>
        <#assign lineTotal +=data.Qty?number>
    </#if>
</#list>

<#--计算所有明细合计-----=end=----->

<#assign page=(field_1?size/size)?ceiling>
<#list 1..page as c>
<#if c*size gt field_1?size>
    <#assign end=field_1?size-1 />
<#else>
    <#assign end=c*size-1 />
</#if>

<div>
    <#if page=c>
    <div>
        <#else>
        <div style="page-break-after:always;">
            </#if>
            <table class="headTable" width="100%" border="0" cellspacing="0" cellpadding="0" style=" line-height: 20px;">
                <tbody>
                <tr>
                    <td colspan="3" class="head" style="text-align: center"><span>${YWZTMC!""}提货单</span>
                    </td>
                </tr>
                <tr>
                    <td width="40%">
                    </td>
                    <td width="33%"></td>
                    <td width="33%" style="text-align: right;">
                                                ${c} /${page}
                    </td>
                </tr>  <tr>
                    <td width="40%"><b>交货地点：</b><b>${jhdd!""}</b>
                    </td>
                    <td width="33%"></td>
                    <td width="33%" style="text-align: right;">
                        No：${BILLNUMBER!""}
                        <#--                        第${c}页/共${page}页-->
                    </td>
                </tr>
                <tr>
                    <td width="33%"><span>客户：</span>${SELLERSNAME!""}</td>
                    <td>${GSJC!""}</td>
                    <td style="text-align: right;"><span>日期：</span>${kprq!""}</td>
                </tr>
                </tbody>
            </table>
            <div width="100%">
                <table width="100%" border="0.1" cellspacing="0" cellpadding="0" class="demo3">
                    <colgroup>
                        <col width="6%"/>
                        <col/>
                        <col width="13%"/>
                        <col width="10%"/>
                        <col width="10%"/>
                        <col width="6%"/>
                        <col width="10%"/>
                        <col width="10%"/>
                        <col width="10%"/>
                    </colgroup>
                    <thead>
                    <tr class="center trMxTitle" style="height: 45px;">
                        <td>行号</td>
                        <td>物料名称</td>
                        <td>规格型号</td>
                        <td>等级</td>
                        <td>包装批号</td>
                        <td>单位</td>
                        <td>数量</td>
                        <td>单价</td>
                        <td>金额</td>
                    </tr>
                    </thead>
                    <tbody>

                    <#list (c-1) * size..end as i>
                        <#assign data=field_1[i]>
                        <tr style="height: 60px;">
                            <td class="center">${data.thdhxm!}</td>
                            <td><b>${data.PRODUCTNAME!}</b></td>
                            <td><b>${data.SPECIFICATIONS!}</b></td>
                            <td>${data.DJ!}</td>
                            <td>${data.BZPH!}</td>
                            <td class="center">${data.KPDW!}</td>
                            <td class="right">${data.KPSL!}</td>
                            <td class="right">${data.TAXPRICE!}</td>
                            <td class="right">${data.TAXAMOUNT!}</td>
                        </tr>
                    </#list>
                    </tbody>
                    <tr>
                        <td colspan="9" height="30px">
                            <table width="100%" border="1" cellspacing="0" cellpadding="0" style="line-height:12px" class="demo4">
                                <colgroup>
                                    <col />
                                    <col width="25%"/>
                                    <col width="28%"/>
                                    <col width="7 %"/>
                                    <col width="18%"/>
                                    <col width="20%"/>
                                </colgroup>
                                <tr>
                                    <td >页累计</td>
                                    <td >数量：${YLJSL!""}</td>
                                    <td colspan="4">金额：${TOTALAMOUNT!""}</td>
                                   <#-- <td >页合计</td>
                                    <td >数量：</td>
                                    <td >金额：</td>-->
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
                <br/>
                <table width="100%" border="0" cellspacing="0" cellpadding="3">
                    <tbody>
                    <tr>
                        <td>备注：${REMARKS!}</td>
                        <td><#--${Approvor!}元--></td>
                        <td></td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    </#list>
    </#if>
    </#escape>
</body>

</html>